package com.redteam.models;

import com.redteam.data.beans.Reservation;
import com.redteam.data.dao.ReservationDAO;

/**
 * Provides methods for updating a Reservation.
 * @author Anthony Ferrari
 */
public class ReservationUpdater {

     ReservationDAO dao;

     /**
      * Default for constructor
      */
    public ReservationUpdater() {
        dao = ReservationDAO.getInstance();
             
    }
    
    
    /**
     * Takes a reservation and updates the database with it's new values
     * @param reservation
     *              The reservation to update
     * @return The number of rows affected in the database
     */
    public int updateReservation(Reservation reservation){
    return dao.update(reservation);
    }
}
